/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.PhoneCodeDao;
import com.techshop.model.PhoneCode;
import com.techshop.service.PhoneCodeService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class PhoneCodeServiceImpl implements PhoneCodeService
{    
    private PhoneCodeDao phoneCodeDao;
    /**
     * @return the phoneCodeDao
     */
    public PhoneCodeDao getPhoneCodeDao()
    {
        return phoneCodeDao;
    }

    /**
     * @param phoneCodeDao the phoneCodeDao to set
     */
    public void setPhoneCodeDao(PhoneCodeDao phoneCodeDao)
    {
        this.phoneCodeDao = phoneCodeDao;
    }

    @Override
    public PhoneCode getById(int phoneCodeId)
    {
        return phoneCodeDao.getById(phoneCodeId);
    }

    @Override
    public PhoneCode getByPhoneAndColor(int phoneId, String colorId)
    {
        return phoneCodeDao.getByPhoneAndColor(phoneId, colorId);
    }

    @Override
    public List<PhoneCode> getByPhoneId(int phoneId)
    {
        return phoneCodeDao.getByPhoneId(phoneId);
    }

    @Override
    public boolean insert(PhoneCode phoneCode)
    {
        return phoneCodeDao.insert(phoneCode);
    }

    @Override
    public boolean update(PhoneCode phoneCode)
    {
        return phoneCodeDao.update(phoneCode);
    }

    @Override
    public boolean delete(PhoneCode phoneCode)
    {
        return phoneCodeDao.delete(phoneCode);
    }

    @Override
    public List<PhoneCode> getAll()
    {
        return phoneCodeDao.getAll();
    }

    @Override
    public List<PhoneCode> search(String name)
    {
        return phoneCodeDao.search(name);
    }
}